package admin

import (
	"myserver/app/controllers/user"
	"myserver/app/jwt"

	"github.com/gin-gonic/gin"
)

func RegisterUserRouters(r *gin.Engine) {

	user := user.UserController{}
	r.POST("/login", user.Login)
	r.POST("/ceatUser", user.CeateUser)
	userRouter := r.Group("/user").Use()
	userRouter.Use(jwt.ValidateToken())
	{
		userRouter.POST("/dellUser", user.DellUser)
		userRouter.GET("/getUserInfo", user.GetUserInfo)
		userRouter.GET("/getUserList", user.GetUserList)
		userRouter.GET("/ceatUser", user.CeateUser)
		userRouter.POST("/upDataUser", user.UpDataUser)

	}
}
